<template>
  <div class="company-center">
    <a-card>
      <a-descriptions title="Resume" bordered>
        <a-descriptions-item label="姓名">
          {{ data.list[0].user.userName }}
        </a-descriptions-item>
        <a-descriptions-item label="年级">
          {{ data.list[0].user.userRole }}
        </a-descriptions-item>
        <a-descriptions-item label="头像">
          <el-avatar shape="circle" :src="data.list[0].user.userImage" />
        </a-descriptions-item>
        <a-descriptions-item label="出生年月">
          {{ data.list[0].user.userBirthday }}
        </a-descriptions-item>
        <a-descriptions-item label="联系方式" :span="2">
          {{ data.list[0].user.userPhone }}
        </a-descriptions-item>
        <a-descriptions-item label="方式" :span="3">
          {{ data.list[0].user.userState }}
        </a-descriptions-item>
        <a-descriptions-item label="期望薪资">
          {{ data.list[0].job.jobSalary }}
        </a-descriptions-item>
        <a-descriptions-item label="期望职位">
          {{ data.list[0].job.jobName }}
        </a-descriptions-item>
        <a-descriptions-item label="学历">
          {{ data.list[0].user.userAcademic }}
        </a-descriptions-item>
        <a-descriptions-item label="期望工作地点">
          {{ data.list[0].wantJob }}
        </a-descriptions-item>
        <a-descriptions-item label="学历">
          {{ data.list[0].user.userAcademic }}
        </a-descriptions-item>
        <a-descriptions-item label="喜欢的公司">
          {{ data.list[0].company.companyName }}
        </a-descriptions-item>
      </a-descriptions>
    </a-card>
    <el-pagination
      page-size="1"
      layout="prev, pager, next"
      :total="total"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  name: 'Index',
  data() {
    return {
      data: '',
      total: '',
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  created() {
    const _this = this
    this.$http.get('/resume/selectResumeByCompanyId/' + this.$store.state.companyId + '/1').then(function(resp) {
      _this.data = resp.data
      _this.total = resp.data.total
    })
  },
  methods: {
    onSubmit() {
      console.log('submit!')
    },
    handleCurrentChange(e) {
      const _this = this
      this.$http.get('/resume/selectResumeByCompanyId/' + '2' + '/' + e).then(function(resp) {
        console.log(resp)
        _this.data = resp.data
      })
    }
  }
}
</script>

<style scoped>

</style>
